<template>
  <div>
    <!-- 导航栏 -->
    <div>
      <van-nav-bar title="商品订单" left-arrow @click-left="$router.go(-1)"> </van-nav-bar>
    </div>
    <!-- 搜索框 -->
    <form action="/">
      <van-search
        v-model="searchvalue"
        show-action
        action-text="搜索"
        shape="round"
        placeholder="查询关键字"
      />
    </form>
    <Tab @blockShow="blockShow" />
    <All :searchvalue="searchvalue" v-if="isblockShow == 'OrderAll'" />
    <OrderDelivered
      :searchvalue="searchvalue"
      v-if="isblockShow == 'OrderDelivered'"
    />
    <OrderReceiving
      :searchvalue="searchvalue"
      v-if="isblockShow == 'OrderReceiving'"
    />
    <OrderEvaluate
      :searchvalue="searchvalue"
      v-if="isblockShow == 'OrderEvaluate'"
    />
    <!-- <router-view /> -->
  </div>
</template>

<script>
import Tab from "@/components/AppOrderTab";
import All from "@/components/OrderAll";
import OrderDelivered from "@/components/OrderDelivered.vue";
import OrderReceiving from "@/components/OrderReceiving";
import OrderEvaluate from "@/components/OrderEvaluate";
export default {
  data() {
    return {
      searchvalue: "",
      isblockShow: "OrderAll",
      path:""
    };
  },
  components: {
    Tab,
    All,
    OrderDelivered,
    OrderReceiving,
    OrderEvaluate,
  },
  methods: {
    blockShow(val) {
      console.log(val);
      this.isblockShow = val;
    },
  },
  created(){
  }
};
</script>
 
<style lang = "less" scoped>
.van-nav-bar {
  background-color: rgb(6, 6, 139);
  /deep/.van-nav-bar__title,
  /deep/.van-icon {
    color: #fff;
  }
}
.van-search {
  .van-search__action {
    color: blue;
  }
}
</style>